/**
 */
package gatperdut.chato.model.Chato.Item.util;

import gatperdut.chato.model.Chato.Item.*;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see gatperdut.chato.model.Chato.Item.ItemPackage
 * @generated
 */
public class ItemSwitch<T> extends Switch<T> {
	/**
     * The cached model package
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	protected static ItemPackage modelPackage;

	/**
     * Creates an instance of the switch.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public ItemSwitch() {
        if (modelPackage == null) {
            modelPackage = ItemPackage.eINSTANCE;
        }
    }

	/**
     * Checks whether this is a switch for the given package.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @parameter ePackage the package in question.
     * @return whether this is a switch for the given package.
     * @generated
     */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
        return ePackage == modelPackage;
    }

	/**
     * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @return the first non-null result returned by a <code>caseXXX</code> call.
     * @generated
     */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
        switch (classifierID) {
            case ItemPackage.ITEM: {
                Item item = (Item)theEObject;
                T result = caseItem(item);
                if (result == null) result = caseGenericItem(item);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.GENERIC_ITEM: {
                GenericItem genericItem = (GenericItem)theEObject;
                T result = caseGenericItem(genericItem);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.GENERIC_INVENTORY: {
                GenericInventory genericInventory = (GenericInventory)theEObject;
                T result = caseGenericInventory(genericInventory);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.STACK: {
                Stack stack = (Stack)theEObject;
                T result = caseStack(stack);
                if (result == null) result = caseAmount(stack);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.FOOD: {
                Food food = (Food)theEObject;
                T result = caseFood(food);
                if (result == null) result = caseAmount(food);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.DRINK: {
                Drink drink = (Drink)theEObject;
                T result = caseDrink(drink);
                if (result == null) result = caseFood(drink);
                if (result == null) result = caseAmount(drink);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.AMOUNT: {
                Amount amount = (Amount)theEObject;
                T result = caseAmount(amount);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.ENTITY_INVENTORY: {
                EntityInventory entityInventory = (EntityInventory)theEObject;
                T result = caseEntityInventory(entityInventory);
                if (result == null) result = caseGenericInventory(entityInventory);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.ENTITY_INVENTORY_SLOT: {
                EntityInventorySlot entityInventorySlot = (EntityInventorySlot)theEObject;
                T result = caseEntityInventorySlot(entityInventorySlot);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.WEAR: {
                Wear wear = (Wear)theEObject;
                T result = caseWear(wear);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.ITEM_TEMPLATE: {
                ItemTemplate itemTemplate = (ItemTemplate)theEObject;
                T result = caseItemTemplate(itemTemplate);
                if (result == null) result = caseGenericItem(itemTemplate);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.BOX_INVENTORY: {
                BoxInventory boxInventory = (BoxInventory)theEObject;
                T result = caseBoxInventory(boxInventory);
                if (result == null) result = caseGenericBoxInventory(boxInventory);
                if (result == null) result = caseGenericInventory(boxInventory);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.TEMPLATE_BOX_INVENTORY: {
                TemplateBoxInventory templateBoxInventory = (TemplateBoxInventory)theEObject;
                T result = caseTemplateBoxInventory(templateBoxInventory);
                if (result == null) result = caseGenericBoxInventory(templateBoxInventory);
                if (result == null) result = caseGenericInventory(templateBoxInventory);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            case ItemPackage.GENERIC_BOX_INVENTORY: {
                GenericBoxInventory genericBoxInventory = (GenericBoxInventory)theEObject;
                T result = caseGenericBoxInventory(genericBoxInventory);
                if (result == null) result = caseGenericInventory(genericBoxInventory);
                if (result == null) result = defaultCase(theEObject);
                return result;
            }
            default: return defaultCase(theEObject);
        }
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Item</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Item</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseItem(Item object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Generic Item</em>'.
     * <!-- begin-user-doc -->
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Generic Item</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public T caseGenericItem(GenericItem object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of '<em>Generic Inventory</em>'.
     * <!-- begin-user-doc -->
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Generic Inventory</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public T caseGenericInventory(GenericInventory object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of '<em>Template</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Template</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseItemTemplate(ItemTemplate object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Box Inventory</em>'.
     * <!-- begin-user-doc -->
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Box Inventory</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public T caseBoxInventory(BoxInventory object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of '<em>Template Box Inventory</em>'.
     * <!-- begin-user-doc -->
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Template Box Inventory</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public T caseTemplateBoxInventory(TemplateBoxInventory object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of '<em>Generic Box Inventory</em>'.
     * <!-- begin-user-doc -->
     * This implementation returns null;
     * returning a non-null result will terminate the switch.
     * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Generic Box Inventory</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
    public T caseGenericBoxInventory(GenericBoxInventory object) {
        return null;
    }

    /**
     * Returns the result of interpreting the object as an instance of '<em>Stack</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Stack</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseStack(Stack object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Food</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Food</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseFood(Food object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Drink</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Drink</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseDrink(Drink object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Amount</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Amount</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseAmount(Amount object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Entity Inventory</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Entity Inventory</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseEntityInventory(EntityInventory object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Entity Inventory Slot</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Entity Inventory Slot</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseEntityInventorySlot(EntityInventorySlot object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>Wear</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>Wear</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
     * @generated
     */
	public T caseWear(Wear object) {
        return null;
    }

	/**
     * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
     * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
     * @param object the target of the switch.
     * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
     * @see #doSwitch(org.eclipse.emf.ecore.EObject)
     * @generated
     */
	@Override
	public T defaultCase(EObject object) {
        return null;
    }

} //ItemSwitch
